

 class Base4{
    public Base4() {
        System.out.println("父类构造方法执行！");
    }
    {
        System.out.println("父类实例代码块执行！");
    }
    static{
        System.out.println("父类静态代码块执行！");
    }
}
class Derived4 extends Base4{
    public Derived4() {
        System.out.println("子类构造方法执行！");
    }
    {
        System.out.println("子类实例代码块执行！");
    }
    static{
        System.out.println("子类静态代码块执行！");
    }
}
public class Test_4 {
    public static void main(String[] args) {
        final int a=10;
        a=20;
        Derived4 test1=new Derived4();
        System.out.println("——————————————————");
        Derived4 test2=new Derived4();
    }
}
